import './List.scss'



const List = (props) => {
    return (<>
        <div className='list'>
            <h1>列表</h1>
            <table  cellSpacing={0}>
                <thead>
                    <tr>
                        <td>标题</td>
                        <td>日期</td>
                        <td>优先级</td>
                    </tr>
                </thead>
                <tbody>
                    {
                        props.list.list.map((item, index) =>
                            <tr key={index}>
                                <td>{item.title}</td>
                                <td>{item.date}</td>
                                <td>{item.priority}</td>
                            </tr>)
                    }
                </tbody>
            </table>
        </div>
    </>
    );
}

export default List;